home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 050 / fastvid.arc / FASTVID.DB < prev    next >
Encoding:
Text File  |  1986-05-13  |  1.6 KB  |  109 lines

  1.  
  2. f100 500 0
  3.  
  4. a100
  5. ;
  6. ; fastvid - fast video routines
  7. ;
  8. ; this program will terminate and stay resident.  it replaces some
  9. ; of the slowest video services with new, faster versions.
  10. ;
  11. ; s.h.smith, 11-may-86
  12. ;
  13. ;
  14.  
  15. a100
  16. ; startup entry point
  17.    jmp 1a0      ;install
  18.  
  19.  
  20. a103
  21. ; vector to old DOS interrupt
  22.    db 0,0,0,0
  23.  
  24.  
  25. a109
  26. ; new video service interrupt
  27.    cmp ah,02
  28.    jz 170         ;DISPLAY OUTPUT
  29.    cmp ah,06
  30.    jz 160         ;DIRECT CONSOLE I/O
  31.    jmp 120
  32.  
  33.  
  34. a120
  35. ; vector to old DOS handler
  36.    cs:
  37.    jmp far [103]  ;to old DOS handler
  38. ;
  39. ; a signature in bytes
  40. ;
  41.    db 0a,0d,'FASTVID - Fast video for DOS, S.H.Smith, 13-May-86',0a,0d
  42.    db 1a
  43.  
  44.  
  45. a160
  46. ;
  47. ; new 'DIRECT CONSOLE I/O' function
  48. ;
  49.    cmp dl,ff
  50.    jz 120      ;let DOS do the console input function
  51.    jmp 170     ;else use new display output function
  52.  
  53.  
  54. a170
  55. ;
  56. ; new 'DISPLAY OUTPUT' function
  57. ; pass display request on to video bios
  58. ;
  59.    cmp dl,9    ;tab?
  60.    jnz 180
  61.    mov dl,20   ;change into space
  62.    jmp 180
  63.  
  64. a180
  65.    push ax     ;dos saves ax...
  66.    mov ah,0e   ;write tty service
  67.    mov al,dl   ;char to write
  68.    mov dl,15   ;default color
  69.    int 10      ;bios video service
  70.    pop ax
  71.    iret
  72.  
  73.  
  74. a1a0
  75. ;
  76. ; startup code
  77. ;
  78.    mov ax,0
  79.    mov ds,ax
  80. ;
  81. ;save old dos vector
  82. ;
  83.    mov ax,[84]
  84.    cs:
  85.    mov [103],ax
  86.    mov ax,[86]
  87.    cs:
  88.    mov [105],ax
  89. ;
  90. ;install new vector
  91. ;
  92.    mov ax,109
  93.    mov [84],ax
  94.    mov ax,cs
  95.    mov [86],ax
  96. ;
  97. ;set last resident code offset
  98. ;and terminate-and-stay-resident
  99. ;
  100.    mov dx,1a0
  101.    int 27
  102.  
  103.  
  104. rcx
  105. 100
  106. nfastvid.com
  107. w
  108. q
  109.